package com.phpxiu.app.model.msg;

import com.tencent.TIMImageElem;
import com.tencent.TIMMessage;

/**
 * Created by 吴金洲 on 2016/8/24
 */
public class C2CImageMsg extends C2CMsg {
    private boolean isDownloading;

    public C2CImageMsg(TIMMessage message){
        this.message = message;
    }

    public C2CImageMsg(String path){
        this(path, false);
    }

    /**
     * 图片消息构造函数
     *
     * @param path 图片路径
     * @param isOri 是否原图发送
     */
    public C2CImageMsg(String path,boolean isOri){
        message = new TIMMessage();
        TIMImageElem elem = new TIMImageElem();
        elem.setPath(path);
        elem.setLevel(isOri?0:1);//level - 0: 原图发送 1: 高压缩率图发送(图片较小，默认值) 2:高清图发送(图片较大)
        //elem.setLevel(2);
        message.addElement(elem);
    }

}
